<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
	<xsl:output method="html" indent="yes"   />
	<xsl:template match="/">
		<xsl:if test="string-length(Schema/@MasterPageFile)&gt;0">
			<xsl:text disable-output-escaping="yes">&lt;</xsl:text>%@ Page language="c#" MasterPageFile="<xsl:value-of select="Schema/@MasterPageFile"></xsl:value-of>" Title="" CodeFile="<xsl:value-of select="Schema/@TableName" />Edit.aspx.cs" AutoEventWireup="true" Inherits="<xsl:value-of select="Schema/@TableName" />Edit" %<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
		</xsl:if>
		<xsl:if test="string-length(Schema/@MasterPageFile)&lt;=0">
			<xsl:text disable-output-escaping="yes">&lt;</xsl:text>%@ Page language="c#"  CodeFile="<xsl:value-of select="Schema/@TableName" />Edit.aspx.cs" AutoEventWireup="true" Inherits="<xsl:value-of select="Schema/@TableName" />Edit" %<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
		</xsl:if>
    <xsl:text disable-output-escaping="yes">&lt;</xsl:text>%@ Register TagPrefix="uc" TagName="SelectLanguage" Src="~/UC/SelectLanguage.ascx"  %<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
    <xsl:if test="string-length(Schema/@MasterPageFile)&gt;0">
			<xsl:text disable-output-escaping="yes">&lt;</xsl:text>asp:Content ID="ctHeader" ContentPlaceHolderID="ContentPlaceHolderHeader" runat="server"<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
			<xsl:text disable-output-escaping="yes">&lt;</xsl:text>/asp:Content<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
			<xsl:text disable-output-escaping="yes">&lt;</xsl:text>asp:Content ID="ctToolbar" ContentPlaceHolderID="ContentPlaceHolderToolbar" runat="Server"<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
      <xsl:text disable-output-escaping="yes">&lt;</xsl:text>asp:Panel ID="panelCurrentPath" Height="20px" CssClass="divPagePath"
         runat="server"<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
        当前位置：<xsl:value-of select="Schema/@TableName" />管理 -> 编辑<xsl:value-of select="Schema/@TableName" />
      <xsl:text disable-output-escaping="yes">&lt;</xsl:text>/asp:Panel<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
      <div class="divLangSelect">
        <xsl:text disable-output-escaping="yes">&lt;</xsl:text>uc:SelectLanguage ID="LanguageSelect" runat="server" /<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
      </div>
      <xsl:text disable-output-escaping="yes">&lt;</xsl:text>/asp:Content<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
			<xsl:text disable-output-escaping="yes">&lt;</xsl:text>asp:Content ID="ctList" ContentPlaceHolderID="ContentPlaceHolderList" runat="Server"<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
		</xsl:if>
		<xsl:if test="string-length(Schema/@MasterPageFile)&lt;=0">
			<xsl:text disable-output-escaping="yes">&lt;</xsl:text>!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
			<xsl:text disable-output-escaping="yes">&lt;</xsl:text>html xmlns="http://www.w3.org/1999/xhtml"<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
			<xsl:text disable-output-escaping="yes">&lt;</xsl:text>head runat="server"<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
			<xsl:text disable-output-escaping="yes">&lt;</xsl:text>meta http-equiv="Content-Type" content="text/html; charset=utf-8" /<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
			<xsl:text disable-output-escaping="yes">&lt;</xsl:text>title>untitle<xsl:text disable-output-escaping="yes">&lt;</xsl:text>/title<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
			<xsl:text disable-output-escaping="yes">&lt;</xsl:text>link href="/css/style.css" rel="stylesheet" type="text/css" /<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
			<xsl:text disable-output-escaping="yes">&lt;</xsl:text>/head<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
			<xsl:text disable-output-escaping="yes">&lt;</xsl:text>body<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
			<xsl:text disable-output-escaping="yes">&lt;</xsl:text>form id="frmMain" method="post" runat="server"<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
		</xsl:if>
    <table width="100%" class="tableContent" cellspacing="1">
			<tr>
				<td class="tdHeader" colSpan="4">
          <img src="/Images/icon_note.gif" /><xsl:value-of select="Schema/@TableName" />编辑
				</td>
			</tr>
			<xsl:for-each select="Schema/Columns[IsIdentity='false']">
				<xsl:if test="position() mod 2=1">
					<xsl:text disable-output-escaping="yes">&lt;</xsl:text>tr<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
				</xsl:if>
					
					<td class="tdTitle"><xsl:value-of select="Description"></xsl:value-of>：</td>
					
        <td>
           <xsl:attribute name="colspan">
             <xsl:if test="position() mod 2=1 and position()=last()">3</xsl:if>
           </xsl:attribute>
						<xsl:text disable-output-escaping="yes">&lt;</xsl:text>asp:TextBox ID="txt<xsl:value-of select="ColumnName"></xsl:value-of>" runat="server" MaxLength="30" /<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
						<font face="宋体" color="red"><xsl:text disable-output-escaping="yes">&amp;</xsl:text>nbsp;*</font>
						<xsl:text disable-output-escaping="yes">&lt;</xsl:text>asp:RequiredFieldValidator ID="rfv<xsl:value-of select="ColumnName"></xsl:value-of>" runat="server" ControlToValidate="txt<xsl:value-of select="ColumnName"></xsl:value-of>"
						Display="None" ErrorMessage="<xsl:value-of select="Description"></xsl:value-of>必须输入" EnableViewState="False"<xsl:text disable-output-escaping="yes">&gt;</xsl:text>*<xsl:text disable-output-escaping="yes">&lt;</xsl:text>/asp:RequiredFieldValidator<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
					</td>
					
				<xsl:if test="position() mod 2=0 or position()=last()">
					<xsl:text disable-output-escaping="yes">&lt;</xsl:text>/tr<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
				</xsl:if>
				
			</xsl:for-each>
			<tr>
				
				<td  colspan="4">
          <xsl:text disable-output-escaping="yes">&amp;</xsl:text>nbsp;
          <xsl:text disable-output-escaping="yes">&lt;</xsl:text>asp:ValidationSummary ID="vs<xsl:value-of select="Schema/@TableName" />" runat="server" HeaderText="请检查下列输入是否合法："
						EnableViewState="False" ShowMessageBox="True" ShowSummary="False"<xsl:text disable-output-escaping="yes">&gt;</xsl:text><xsl:text disable-output-escaping="yes">&lt;</xsl:text>/asp:ValidationSummary<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
					<xsl:text disable-output-escaping="yes">&lt;</xsl:text>asp:Label ID="lblMessage" runat="server" ForeColor="Red" EnableViewState="False"<xsl:text disable-output-escaping="yes">&gt;</xsl:text><xsl:text disable-output-escaping="yes">&lt;</xsl:text>/asp:Label<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
				</td>
				
			</tr>
			<tr>
				
				<td class="tdButton" colspan="4">
					
					<xsl:text disable-output-escaping="yes">&lt;</xsl:text>asp:Button ID="btnOK" runat="server" Text="提交" EnableViewState="False" OnClick="btnOK_Click"<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
					<xsl:text disable-output-escaping="yes">&lt;</xsl:text>/asp:Button<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
					<input type="button" class="button" value="返回" onclick='location.href="{Schema/@TableName}List.aspx"' />
				</td>
				
			</tr>
			
		</table>
		
		<xsl:if test="string-length(Schema/@MasterPageFile)&gt;0">
			<xsl:text disable-output-escaping="yes">&lt;</xsl:text>/asp:Content<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
		</xsl:if>
		<xsl:if test="string-length(Schema/@MasterPageFile)&lt;0">
			<xsl:text disable-output-escaping="yes">&lt;</xsl:text>/form<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
			<xsl:text disable-output-escaping="yes">&lt;</xsl:text>/body<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
			<xsl:text disable-output-escaping="yes">&lt;</xsl:text>/html<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
		</xsl:if>
	</xsl:template>
</xsl:stylesheet>